<h1><? if(! empty($slide->id)): ?>
    Izmena slajda
<? else: ?>
    Novi slajd
<? endif ?></h1>

<form action="/admin_home/save" method="post" enctype="multipart/form-data">
    <?= $this->hidden(array('data', 'id'), @$slide->id) ?>

    <?= $this->image_picker(array('data', 'image'), array(
        'label' => 'Slika:',
        'value' => @$slide->image,
        'directory' => "/img/slideshow/"
    )) ?>

    <p><?= $this->text(array('data', 'title'), array(
        'label' => 'Naslov:',
        'value' => @$slide->title
    )) ?></p>

    <p><?= $this->submit('Sačuvaj') ?><? if(! empty($slide)): ?>
    <?= $this->link('Obriši', "/admin_home/delete/{$slide->id}", array(
        'class'   => 'right input delete',
        'confirm' => 'Da li želite da obrišete slajd?'
    )) ?><?= $this->link('&laquo; nazad', '/admin_home', array('class' => 'right')) ?>
    <? endif ?></p>
</form>